#include "GameManager.h"

int main(void)
{
	GameManager* g1 = new GameManager();
	GameManager* g2 = new GameManager();
	GameManager* g3 = new GameManager();

	//---------- task 1 -------------

	MutableSolver* s1 = new MutableSolver();
	MutableSolver* s2 = new MutableSolver();
	MutableSolver* s3 = new MutableSolver();

	//-----------config---------------
	s2->set_param(1, 10)->set_param(2, 27.8)->set_param(3, 4.1)->set_param(4, 1);
	s3->set_param(1, 8)->set_param(2, 27.8)->set_param(3, 4.1)->set_param(4, 1);
	vector<TemplateSolver*>* v1 = new vector<TemplateSolver*>();

	v1->push_back(s1);
	v1->push_back(s2);
	v1->push_back(s3);

	thread th1 = g1->get_select_task(v1, 3);

	//----------- task 2 -------------

	MutableSolver* s4 = new MutableSolver();
	MutableSolver* s5 = new MutableSolver();
	MutableSolver* s6 = new MutableSolver();



	s5->set_param(1, 10)->set_param(2, 27.8)->set_param(3, 4.1)->set_param(4, 1);
	s6->set_param(1, 8)->set_param(2, 27.8)->set_param(3, 4.1)->set_param(4, 1);
	vector<TemplateSolver*>* v2 = new vector<TemplateSolver*>();

	v2->push_back(s4);
	v2->push_back(s5);
	v2->push_back(s6);

	thread th2 = g2->get_select_task(v2, 1);

	th1.join();
	th2.join();

}